home *** CD-ROM | disk | FTP | other *** search
-
-
- HOW TO USE PUSHDIR.COM & POPDIR.COM
-
- Getting back to where you started is a problem with PATH, but
- with PUSHDIR and POPDIR you can stack directories like cordwood.
- Wouldn't it be nice if you could just type a simple name from
- anywhere on your hard disk, and your favorite program would run
- automatically regardless of which directory it was in, then
- return you to where you started? PUSHDIR and POPDIR let you do
- just that. They provide some helpful batch file functions for
- switching directories automatically, going beyond the limitations
- of the DOS PATH command.
-
- The author of this utility program is John Friend, an independent
- software developer and consultant. He is the author of PC-OUTLINE.
- The ASSEMBLY and BASIC source codes to make PUSHDIR.COM and
- POPDIR.COM appeared in the May 27, 1986 issue of PC Magazine,
- Volume 5, Number 10.
-
- USING PUSHDIR.COM and POPDIR.COM - To use these two utilities to
- invoke any program (1-2-3 as an example) from anywhere on your
- hard disk, here's what you do:
-
- 1. Create a batch file called 12.BAT with the following
- instructions:
- PUSHDIR (save the current directory)
- CD\LOTUS (change to LOTUS directory)
- 123 (start 1-2-3)
- POPDIR (restore original directory)
-
- 2. Set the DOS PATH command in your AUTOEXEC.BAT file to
- include the directory in which you keep the above batch
- file and also to include the directory where PUSHDIR.COM
- and POPDIR.COM reside.
-
- 3. Type 12<ENTER> from anywhere on your hard disk and 1-2-3
- will start.
-
- The DOS PATH command will find the 12.BAT file and start executing
- it. PUSHDIR will save the current directory; CD\LOTUS will switch
- to the LOTUS directory; and 123 will start execution of 1-2-3.
- When 1-2-3 is finished, POPDIR will restore the original current
- directory, so you'll be back in the same directory you were in
- before you entered 1-2-3.
-
- To use this same technique for other programs, simply create batch
- files (usually all placed in the same directory) and substitute
- the appropriate names for the desired current directory ( in place
- of LOTUS) and the program name (in place of 123).
-
- To get the complete story, see the article, which starts on page
- 243 of the above mentioned issue of PC Magazine.
-
- To print this file, set the printer to the top of the page and
- enter the following command:
-
- A>copy PUSH-POP.DOC prn
-